//
//  Income.m
//  Wallets Manager
//
//  Created by Nguyen Chi Cong on 9/26/12.
//  Copyright (c) 2012 BKHN. All rights reserved.
//

#import "Income.h"
#import "Plan.h"
#import "DataBaseAccess.h"


@implementation Income

@dynamic i_name;
@dynamic i_amount;
@dynamic i_date;
@dynamic i_notes;
@dynamic iToIncomeType;
@dynamic iToPlan;

-(void)moveTransactionToPlan: (NSString *)pName
{
    Plan *plan = [DataBaseAccess planForName:pName];
    self.iToPlan = plan;
    //[DataBaseAccess saveData];
}

-(void)moveTransactionToType: (NSString *)tName
{
    IncomeType *it = [DataBaseAccess iTypeForName:tName];
    self.iToIncomeType = it;
    //[DataBaseAccess saveData];
}

@end
